﻿package com.yy.base{
    import flash.display.*;
    import flash.system.*;
    import flash.utils.*;

	/**
	 *程序的 主要信息
	 * @author YY
	 * 
	 */
    public class App {

        public static var appDomain:ApplicationDomain;//程序文件域
        private static var _appStage:Stage;	//舞台引用
        public static var appLang:String = "en";//语言版本
        private static var _stime:Number = 0;//服务器的时间
        private static var _ctimer:Number = 0;//客户端的时间

		public static function get appStage():Stage
		{
			return _appStage;
		}

		public static function set appStage(value:Stage):void
		{
			_appStage = value;
			_appStage.tabChildren = false;
			_appStage.scaleMode = StageScaleMode.SHOW_ALL;
		}

        public static function get stime():Number{
            if (_stime == 0){
                stime = Math.floor((new Date().getTime() / 1000));
            };
            return ((_stime + Math.floor(((getTimer() - _ctimer) / 1000))));
        }
        public static function set stime(t:Number):void{
            _stime = t;
            _ctimer = getTimer();
        }
    }
}
